package com.oauth.service.application.registry.beans;

import java.util.EnumSet;

import org.springframework.stereotype.Component;

import com.oauth.service.global.ApplicationGlobalService;
import com.oauth.service.global.beans.GlobalDataType;

/**
 * This class is created to avoid spring error while injecting
 * Set<ApplicationInfoBean> based on qualifier. If no bean with qualifer is
 * found, then spring will throw error.So, this bean is here to avoid such
 * error.
 * 
 * @author asanthan
 * 
 */
@Component
@ApplicationInfo
public class EmptyApplicationInfoBean implements ApplicationInfoBean {

	private Long mKey;

	private String mName;

	private String globalDataTypes;

	public EnumSet<GlobalDataType> getGlobalDataType() {
		return globalDataTypes == null ? null : GlobalDataType.getEnumSetByName(globalDataTypes);
	}

	@Override
	public Long getKey() {
		return mKey;
	}

	@Override
	public String getName() {
		return mName;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.oauth.service.application.registry.beans.ApplicationInfoBean#
	 * getAppGlobalService()
	 */
	@Override
	public ApplicationGlobalService getAppGlobalService() {
		// TODO Auto-generated method stub
		return null;
	}

}
